using System.Collections.Generic;
using MoonFramework.Template;
using Sirenix.OdinInspector;
using UnityEngine;

namespace Config
{
    [CreateAssetMenu(fileName = "篝火配置", menuName = "Config/篝火配置")]
    public class CampfireConfig : BaseConfig
    {
        [LabelText("默认燃料数值")] public float DefaultFuelValue;
        [LabelText("燃料消耗速度（每秒燃烧）")] public float FuelConsumptionSpeed;
        [LabelText("燃料最大值")] public float FuelMaxValue;
        [LabelText("最大灯光亮度")] public float MaxLightIntensity;
        [LabelText("最大灯光范围")] public float MaxLightRange;
        [LabelText("燃料和物品对照表")] public readonly Dictionary<int, float> ItemFuelDic = new Dictionary<int, float>();
        [LabelText("烘焙物品对照表")] public readonly Dictionary<int,int> BakeItemDic = new Dictionary<int, int>();
        
        public bool TryGetFuelValueByItemID(int itemID, out float fuelValue)
        {
            return ItemFuelDic.TryGetValue(itemID, out fuelValue);
        }
        
        public bool TryGetBakedItemByItemID(int itemID, out int bakedID)
        {
            return BakeItemDic.TryGetValue(itemID, out bakedID);
        }
    }
}